package com.mdp.im.core.subscriber.action.impl;

import com.alibaba.fastjson.JSONObject;
import com.mdp.im.core.scbscriber.api.action.ScbscriberAction;
import com.mdp.im.core.subscriber.action.AbstractSubscriberAction;
import org.springframework.stereotype.Service;

/**
 * 删除消息处理器
 * 
 * @author chenyc
 * @date 2018/6/5
 */
@Service
public class RemoveMessageAction extends AbstractSubscriberAction implements ScbscriberAction {

    /**
     * 删除消息
     */
    @Override
    public void doAction(JSONObject message) {
    	JSONObject json = message; 
        String msgType=json.getString("msgType");
        String groupId=json.getString("groupId");
        if("group".equals(msgType)) {
        	  super.handleMessageWithGroup(message, true, groupId);
        	 //publisher.publishGroupMessageToDbQueue(msg);
        }else if("prichat".equals(msgType)){
        	String toUserid=json.getString("toUserid");
        	String sendUserid=json.getString("sendUserid");
        	  super.handleMessageWithUserids(message,toUserid,sendUserid );
        }
       
        
    }

}
